############################# wxYate Client source Files ####################################

ADD_SRC_DIR(citrus_src pkgmgr)
# ADD_SRC_FILE(citrus_src cygwine/cygwine.rc)
ADD_SRC_DIR(citrus_src common)
ADD_SRC_DIR(citrus_src wxbzip)
ADD_SRC_DIR(citrus_src wxbzip/bzip)

IF(WIN32) # FOR WIN32
    FIND_PROGRAM(WINDRES windres DOC "MinGW windres")
    ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr.rc.o
        COMMAND ${WINDRES} -I $ENV{WXWIN}/include -i ${CMAKE_CURRENT_SOURCE_DIR}/pkgmgr/pkgmgr.rc -o ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr.rc.o
        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/pkgmgr/pkgmgr.rc
    )
    
    ADD_SRC_FILE(citrus_src ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr.rc.o)
ENDIF()

BISON_TARGET(IniParser common/iniparse.yy  ${CMAKE_CURRENT_BINARY_DIR}/iniparse.cpp)
FLEX_TARGET(IniLexer common/inilex.ll    ${CMAKE_CURRENT_BINARY_DIR}/inilex.cpp)
ADD_FLEX_BISON_DEPENDENCY(IniLexer IniParser)

include_directories(${CMAKE_CURRENT_BINARY_DIR})
ADD_SRC_FILE(citrus_src  ${BISON_IniParser_OUTPUTS} )
ADD_SRC_FILE(citrus_src  ${FLEX_IniLexer_OUTPUTS} )
